

*******************************************************************************************************************************
*Replication code for "Trump Tweets and Democratic Attitudes: Evidence from a Survey Experiment" (descriptive statistics usign WVS)*
*******************************************************************************************************************************
*******************************************************************************************************************************

*** AUHTORS CONTACT: **********************************
* Shaun Bowler
* University of California, Riverside
* Department of Political Science
* shaun.bowler@ucr.edu

* Miguel Carreras
* University of California, Riverside
* Department of Political Science
* miguel.carreras@ucr.edu

* Jennifer Merolla
* University of California, Riverside
* Department of Political Science
* merolla@ucr.edu


******************************************************

***This analysis is based on a dataset gathered by the authors from different US waves of LAPOP. The original datasets and codebooks can be downloaded here: http://datasets.americasbarometer.org/database/index.php?freeUser=true ***

drop if year==2006

*Recode/rename variables for analysis*

gen ideology = l1b 

gen close_congress = jc15a
recode close_congress 2=0

gen close_supreme_court = jc16a 
recode close_supreme_court 2=0


gen courts_fair_trial= b1 

gen respect_institutions = b2 

gen proud_pol_system = b4

gen support_pol_system = b6

gen trust_congress = b13

gen trust_parties = b21

gen trust_president = b21a

gen trust_media = b37

gen trust_media_dummy = 0
replace trust_media_dummy =1 if trust_media > 4

gen trust_elections = b47a

gen trust_elections_dummy = 0
replace trust_elections_dummy =1 if trust_elections > 4

gen performance_trump = m1

gen performance_congress = m2

gen dem_churchill = ing4

gen dem_churchill_dummy = 0
replace dem_churchill_dummy =1 if dem_churchill >4

gen satisfaction_democracy = pn4

gen tolerance_vote = d1

gen tolerance_demonstrations = d2

gen tolerance_run_office = d3

gen tolerance_speeches = d4

gen tolerance_homosecuals = d5


gen tolerance_scale = (d1+d2+d3+d4)/4

gen republican=0
replace republican =1 if usvb1011==4001
replace republican =1 if pid3==2

gen democrat=0
replace democrat =1 if usvb1011==4002
replace democrat =1 if pid3==1


gen independent=0
replace independent =1 if usvb1011==4003
replace independent =1 if pid3==3

gen female=0
replace female=1 if q1==2

gen age=q2


***Replication figure 2***


sum close_congress if year==2010 & democrat==1
sum close_congress if year==2010 & republican==1

sum close_congress if year==2012 & democrat==1
sum close_congress if year==2012 & republican==1

sum close_congress if year==2014 & democrat==1
sum close_congress if year==2014 & republican==1

sum close_congress if year==2017 & democrat==1
sum close_congress if year==2017 & republican==1

sum close_congress if year==2019 & democrat==1
sum close_congress if year==2019 & republican==1


***Replication figure A1 (appendix)***


sum close_supreme_court if year==2010 & democrat==1
sum close_supreme_court if year==2010 & republican==1

sum close_supreme_court if year==2012 & democrat==1
sum close_supreme_court if year==2012 & republican==1

sum close_supreme_court if year==2019 & democrat==1
sum close_supreme_court if year==2019 & republican==1


